//
//  MainViewController.m
//  PDA
//
//  Created by 吕晶 on 2020/1/7.
//  Copyright © 2020 吕晶. All rights reserved.
//

#import "MainViewController.h"

@interface MainViewController ()

@end

@implementation MainViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = Color_backgroundColor;
    self.rt_navigationController.useSystemBackBarButtonItem = NO;
    self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:[UIColor blackColor],NSFontAttributeName:BoldFontOfSize(18)};
    self.navigationController.navigationBar.tintColor = HexColor(0x000000);
    [self.navigationController.navigationBar setBackgroundImage:[FactoryMethod imageWithColor:HexColor(0xFFFFFF)] forBarMetrics:UIBarMetricsDefault];
    [self.navigationController.navigationBar setShadowImage:[UIImage new]];
}

//设置自定义返回按钮
- (UIBarButtonItem *)rt_customBackItemWithTarget:(id)target action:(SEL)action {
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    [btn setImage:[UIImage imageNamed:@"nav_back"] forState:UIControlStateNormal];
    [btn sizeToFit];
    [btn addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
    return [[UIBarButtonItem alloc] initWithCustomView:btn];
}

- (void)dealloc {
    NSLog(@"---- %@ ---- dealloc ----",self.class);
}

@end
